//
// Created by kqbi on 2020/2/24.
//

#ifndef VIICS_HTTPSERVER_H
#define VIICS_HTTPSERVER_H


#include "Utils/Util.h"
#include "Service/HttpService.h"
#include "S_HttpServerAPI.h"
#include <memory>

class HttpServer {
public:

    HttpServer(std::weak_ptr<HttpService> httpService);

    ~HttpServer();

    void AddFilePath(const std::string &filePath);

    void InitHandle();

    bool Listen();

    void Stop();

private:
    http_server _httpServer = 0;

    std::weak_ptr<HttpService> _httpService;
};

#endif //VIICS_HTTPSERVER_H
